﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package reprise.data.collection {

    public dynamic class IndexedArray extends Array {

        public function IndexedArray(){
            splice.apply(this, [0, 0].concat(arguments));
        }
        public function init():void{
            splice(0, this.length);
        }
        public function remove(_arg1:Object):Boolean{
            var _local2:int = indexOf(_arg1);
            if (_local2 == -1){
                return (false);
            };
            splice(_local2, 1);
            return (true);
        }
        public function insertObjectAtIndex(_arg1:Object, _arg2:int):void{
            splice(_arg2, 0, _arg1);
        }
        public function replaceObjectWithObject(_arg1:Object, _arg2:Object):Boolean{
            var _local3:int = indexOf(_arg1);
            if (_local3 == -1){
                return (false);
            };
            this[_local3] = _arg2;
            return (true);
        }
        public function removeObjectAtIndex(_arg1:int):Boolean{
            if ((((_arg1 < 0)) || ((_arg1 > (length - 1))))){
                return (false);
            };
            splice(_arg1, 1);
            return (true);
        }
        public function isEmpty():Boolean{
            return ((this.length < 1));
        }
        public function objectExists(_arg1:Object):Boolean{
            return (!((indexOf(_arg1) == -1)));
        }
        public function addObjectsFromArray(_arg1:Array):void{
            var _local2:int;
            while (_local2 < _arg1.length) {
                push(_arg1[_local2]);
                _local2++;
            };
        }
        public function getIndex(_arg1:Object):int{
            return (indexOf(_arg1));
        }

    }
}//package reprise.data.collection 
